-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fixes state writes with private variables #504
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Reviewed everything up to 8a9c3c5 in 27 seconds
More details
- Looked at
70
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. burr/core/application.py:194
- Draft comment:
The parameterstate_subset_pre_update
in the docstring does not match the actual parameter namestate_to_modify
. Please update the docstring to reflect the correct parameter name. - Reason this comment was not posted:
Comment was not on a valid diff hunk.
Workflow ID: wflow_tax4fUCpzioXToNM
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
A preview of 00f17f4 is uploaded and can be seen here: ✨ https://burr.dagworks.io/pull/504 ✨ Changes may take a few minutes to propagate. Since this is a preview of production, content with |
This drops private variables when written by an action. Note we do *not* add tests for this as it is undefined behavior -- we may error out later on.
8a9c3c5
to
00f17f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on 00f17f4 in 30 seconds
More details
- Looked at
70
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. docs/concepts/state.rst:33
- Draft comment:
The documentation should mention that private variables (starting with__
) are automatically dropped during state updates to prevent undefined behavior. - Reason this comment was not posted:
Comment was on unchanged code.
2. burr/core/application.py:194
- Draft comment:
The comment mentions "undefined behavior" but does not specify that private variables are dropped during state updates. Consider clarifying this in the comment. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_Q4ZdyXPDmeLSVdSk
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. but are you sure there's no test to be written? At least to break if we modify the current behavior?
Yes, it's specifically undefined (as in we want to address it further but not now), so I'm comfortable not adding tests for now as to not encode a contract we don't need. |
This drops private variables when written by an action. Note we do not add tests for this as it is undefined behavior -- we may error out later on.
Important
_state_update
inapplication.py
now drops private variables when written by an action, with a warning added instate.rst
about undefined behavior._state_update
inapplication.py
now drops private variables (keys starting with__
) when written by an action.state.rst
about undefined behavior when modifying private variables starting with__
.This description was created by
for 00f17f4. It will automatically update as commits are pushed.